import {createStore,applyMiddleware,combineReducers} from 'redux'
import countReducer from '../Reducers/counReducer'
import { movieReducer} from '../Reducers/movieReducer'
import thunk from 'redux-thunk'

// 合并多个reducer
const allReducer = combineReducers({
    count:countReducer,
    movie:movieReducer,
})

// createStore的第一个参数 是接收reducer函数的 第二个参数是调用中间件的
const Store = createStore(allReducer,applyMiddleware(thunk))

export default Store